# eric7.WebBrowser.UserAgent.UserAgentReader

Module implementing a class to read user agent data files.

### Global Attributes

None

### Classes

UserAgentReader | Class implementing a reader object for user agent data files.

### Functions

None

## UserAgentReader

Class implementing a reader object for user agent data files.

### Derived from

QXmlStreamReader

### Class Attributes

None

### Class Methods

None

### Methods

UserAgentReader | Constructor
__readUserAgents | Private method to read the user agents data.
__skipUnknownElement | Private method to skip over all unknown elements.
read | Public method to read a user agent file.

### Static Methods

None

#### UserAgentReader (Constructor)

UserAgentReader()

Constructor

#### UserAgentReader.__readUserAgents

__readUserAgents()

Private method to read the user agents data.

#### UserAgentReader.__skipUnknownElement

__skipUnknownElement()

Private method to skip over all unknown elements.

#### UserAgentReader.read

read(fileNameOrDevice)

Public method to read a user agent file.

fileNameOrDevice (str or QIODevice)
  name of the file to read or reference to the device to read

Return:
  dictionary with user agent data (host as key, agent string as value)

Return Type:
  dict

Up